//
//  RegisterViewController.swift
//  FM
//
//  Created by x on 2017/11/8.
//  Copyright © 2017年 HLB. All rights reserved.
//

import UIKit

class RegisterViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        setupUI()
    }

    /// 初始化
    func setupUI() -> Void {
        view.backgroundColor = UIColor.white
        navigationItem.title = "注册"
        navigationItem.leftBarButtonItem = UIBarButtonItem.creatBarButtonItem(imageName: "back", target: self, action: #selector(backBtuClick))
        
        //1.添加View
        registerView.delegate = self
        view.addSubview(registerView)
    }
    
    func backBtuClick() -> Void {
        navigationController?.popViewController(animated: true)
    }
    
    private lazy var registerView:RegisterView = RegisterView(frame: CGRect.init(x: 0, y: 0, width: self.view.bounds.width, height: self.view.bounds.height))

}

extension RegisterViewController:BaseViewDelegate {
    
    func refreshOrVCodeBtuDidClick(tag: NSInteger) {
        if tag == 1 {
            print("您点击了刷新图形验证码的刷新按钮...")
        }else {
            print("您点击了获取短信验证码的按钮...")
        }
    }
    
    func registerOrConfirmBtuDidClick() {
        print("您点击了注册按钮按钮...")
    }
}
